﻿@model mtm.Core.Models.ChangePasswordModel
@{ 
    /* Copyright © 2009 - 2010 Oleg Stuhin & Rostislav Haitovich 
       To learn more about mytrip.mvc visit  
       http://mytripmvc.net  http://mytripmvc.codeplex.com 
       mytripmvc@gmail.com
       license: Microsoft Public License (Ms-PL) */ 
}
@{
    ViewBag.Title = Html.MytripPageTitle(CoreLanguage.change_password, "/");
    ViewBag.Keywords=Html.MytripPageTitle(CoreLanguage.change_password, ",");
    ViewBag.Description=Html.MytripPageTitle(CoreLanguage.change_password, ",");
}
@section scriptlink{
@Html.ScriptLink("jquery.validate.min.js,jquery.validate.unobtrusive.min.js")
}
@section content{
<h1 class="title">@CoreLanguage.change_password</h1>
<table class="noborders">
<tr>
<td style="width: 180px;">
         <div style="text-align: center;"><a href='/Home/Profile/@TempData["username"].ToString()'>
@Html.Avatar(TempData["useremail"].ToString(), new { title="ArticleLanguage.view_user_profile"})</a></div>
     @Html.Partial("_profileSmall")
</td>
<td>
@if(!Model.Change){
<p>@CoreLanguage.change_password_text_first</p>
<p>@string.Format(CoreLanguage.change_password_text_last, Model.minRequiredPasswordLength)</p>

using (Html.BeginForm()){ 
<fieldset>
<div class="editor-label">
@Html.LabelFor(m => m.OldPassword, CoreLanguage.OldPassword)
</div>
<div class="editor-field">
@Html.PasswordFor(m => m.OldPassword)
@Html.ValidationMessageFor(m => m.OldPassword)
</div>
<div class="editor-label">
@Html.LabelFor(m => m.NewPassword, CoreLanguage.NewPassword)
</div>
<div class="editor-field">
@Html.PasswordFor(m => m.NewPassword) 
@Html.ValidationMessageFor(m => m.NewPassword) 
</div>
<div class="editor-label">
@Html.LabelFor(m => m.ConfirmPassword, CoreLanguage.ConfirmPassword)
</div>
<div class="editor-field">
@Html.PasswordFor(m => m.ConfirmPassword) 
@Html.ValidationMessageFor(m => m.ConfirmPassword)
</div>
<div class="button">
@Html.MytripButton(CoreLanguage.change_password, true,"left")
</div>
</fieldset>
}}else{
<div class="appr">
<p>@CoreLanguage.change_password_success</p>
</div>
} 
</td></tr>
</table>
}